package com.atm.atmsys.config;


import com.alipay.easysdk.kernel.Config;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Data
public class AlipayConfig {
    @Bean
    public Config config(AlipayProperties alipayProperties){
        Config config=new Config();
        config.protocol=alipayProperties.getProtocol();
        config.gatewayHost=alipayProperties.getGatewayHost();
        config.signType=alipayProperties.getSignType();
        config.appId=alipayProperties.getAppId();
        config.merchantPrivateKey=alipayProperties.getMerchantPrivateKey();
        config.alipayPublicKey=alipayProperties.getAlipayPublicKey();
        config.notifyUrl=alipayProperties.getNotifyUrl();
        config.encryptKey="";
        return config;
    }


}
